package com.yuq.sunrise.common.service;

import java.util.List;

public interface IBaseService<T> {

    /**
     * create by: yuq
     * description: 新增对象
     * create time: 2019-06-09 00:26
     *
     * @param t
     * @return
     */
    Integer save(T t);

    /**
     * create by: yuq
     * description: 删除对象
     * create time: 2019-06-09 00:27
     *
     * @param t
     * @return
     */
    Integer delete(T t);

    /**
     * create by: yuq
     * description: 根据主键删除对象
     * create time: 2019-06-09 15:16
     *
     * @param o
     * @return
     */
    Integer deleteByPrimaryKey(Object o);

    /**
     * create by: yuq
     * description: 修改对象
     * create time: 2019-06-09 00:26
     *
     * @param t
     * @return
     */
    Integer updateByPrimaryKey(T t);

    /**
     * create by: yuq
     * description: 根据<T>查询单个对象
     * create time: 2019-06-09 00:27
     *
     * @param t
     * @return
     */
    T queryOne(T t);

    /**
     * create by: yuq
     * description: 根据主键查询对象
     * create time: 2019-06-09 15:17
     *
     * @param o
     * @return
     */
    T queryByPrimaryKey(Object o);

    /**
     * create by: yuq
     * description: 根据<T>查询多个对象
     * create time: 2019-06-09 15:12
     *
     * @param t
     * @return
     */
    List<T> queryList(T t);

    /**
     * create by: yuq
     * description: 根据主键查询单个对象
     * create time: 2019-06-09 15:13
     *
     * @param o
     * @return
     */
    T queryOneByPrimaryKey(Object o);

    /**
     * create by: yuq
     * description: 根据Object查询多个对象
     * create time: 2019-06-09 15:13
     *
     * @param o
     * @return
     */
    List<T> queryListByObject(Object o);

    /**
     * create by: yuq
     * description: 查询所有
     * create time: 2019-06-09 00:27
     *
     * @return
     */
    List<T> queryAll();

}
